/** Interface definition for business logic related to 
 *  property access and management
 *
 *  @author Scott Monahan
 *  @version $Id$
 *  
 *  File last changed on $Date:$ by $Author:$ in $Rev:$
 *
 */

package info637.pprc.services;

import info637.pprc.ErrorCodes;
import info637.pprc.model.Property;

import java.util.List;


public interface IPropertyService {

	LoginResponse login(String userName, String password);
	
	class LoginResponse extends ServiceResponse {

		private String sessionId = null;

		public LoginResponse(String sessionId) {
			
			super();
			
			this.sessionId = sessionId;
		}

		public LoginResponse(List<ErrorCodes> errorCodes) {
			
			super(errorCodes);
		}
		
		public String getSessionId() {
			
			return sessionId;
		}
	}
	
	PropertyDetailResponse getPropertyDetail(String propertyId);
	
	class PropertyDetailResponse extends ServiceResponse { 
		
		private Property property = null;

		public PropertyDetailResponse(Property property) {
			
			this.property = property;
		}
		
		public PropertyDetailResponse(List<ErrorCodes> errorCodes) {
			
			super(errorCodes);
		}
		
		public Property getProperty() {
			
			return property;
		}
	}
	
	AddPropertyResponse addProperty(Property propertyToAdd);
	
	class AddPropertyResponse extends ServiceResponse { 
		
		public AddPropertyResponse() {
			
			super();
		}
		
		public AddPropertyResponse(List<ErrorCodes> errorCodes) {
			
			super(errorCodes);
		}
	}
	
	UpdatePropertyResponse updateProperty(Property propertyToupdate);
	
	class UpdatePropertyResponse extends ServiceResponse { 
		
		public UpdatePropertyResponse() {
			
			super();
		}
		
		public UpdatePropertyResponse(List<ErrorCodes> errorCodes) {
			
			super(errorCodes);
		}
	}
	
	PropertyListResponse findByAdminFilterData(
		String propertyName, String tenantName, String balance
	);
	
	PropertyListResponse findByPublicFilterData(
		String address, String city, String state, String zip, String monthlyRent);
	
	class PropertyListResponse extends ServiceResponse { 
		
		private List<Property> propertyList = null;
		
		public PropertyListResponse() {
			
			super();
		}
		
		public PropertyListResponse(List<ErrorCodes> errorCodes) {
			
			super(errorCodes);
		}

		public List<Property> getPropertyList() {
			return propertyList;
		}

		public void setPropertyList(List<Property> propertyList) {
			
			this.propertyList = propertyList;
		}
	}
}
